Otherwise User members will wind up retaining stale references to
services. The more things move to services, the more state we need to
reset between tests to avoid subtle and confusing test failures!
TestUsers can't be created if the DB prefix is not either unittest_ or
ut_, which caused failures in RCFeedIntegrationTest.php with this change
now that it was trying to create a new TestUser. Fix is to set the
prefix to one of those two instead of empty.
Change-Id: I41f87e1acffe94361748ef4ab69c290de587e6be
}
}
+ // Clear any cached test users so they don't retain references to old services
+ TestUserRegistry::clear();
+
// Re-enable any disabled deprecation warnings
MWDebug::clearLog();
// Restore mw globals
'wgServerName' => 'example.org',
'wgScriptPath' => '/w',
'wgDBname' => 'example',
- 'wgDBprefix' => '',
+ 'wgDBprefix' => $this->dbPrefix(),
'wgRCFeeds' => [],
'wgRCEngines' => [],
] );
'server_url' => 'https://example.org',
'server_name' => 'example.org',
'server_script_path' => '/w',
- 'wiki' => 'example',
+ 'wiki' => 'example-' . $this->dbPrefix(),
] ),
$line
);